<?php
namespace app\index\controller;

use think\Controller;
use think\Cookie;

class Base extends Controller{
    public function _initialize(){
        if (!Cookie::has('user_id')){
            $this->redirect('/index/login/index');
        }
    }
}
